package logic.common.game.endConditions;

import gameStates.gui.EndWindowState;
import logic.common.game.Game;
import logic.common.team.Team;
import main.InitGame;

public abstract class MatchEndCondition {
	
	protected Game game;
	
	public MatchEndCondition(Game game) {
		this.game = game;
	}
	
	protected void endGame(Team winnerTeam) {
		game.endGame();
		
		EndWindowState endState = new EndWindowState(game, winnerTeam, winnerTeam.getIngameState().getPassManagerState());
		endState.setActive(true);
		
		InitGame.get().gameFinished();
	}
}